package com.type.service;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.type.dao.AlarmDAO;
import com.type.vo.AlarmVO;
import com.type.vo.ListAlarmVO;
import com.type.vo.PagingDTO;

@Service("TypeThreeService")
public class TypeThreeService {
	@Resource(name="AlarmDAO")
	private AlarmDAO dao;
	
	public ListAlarmVO selectAlarmListByPaging(int page){
		ArrayList<AlarmVO> alarmlist = dao.selectAlarmListByPaging(page);
		int total = dao.getTotalCountOfAlarm();
		PagingDTO paging = new PagingDTO(total, page);
		ListAlarmVO listAlarm = new ListAlarmVO(alarmlist, paging);
		return listAlarm;
	}
	
	
}
